Download OpenAPI specification:Download
An API for the Marketplace application
Create a product to sell. Using the product name, description, condition, category and price
The products information
|
description
required
|
string
<=
700 characters
A 700 character description of the product |
|
name
required
|
string
The name of the product |
|
price
required
|
integer
The price of the product |
|
condition
required
|
string
A description of the condition of the product |
|
category
required
|
string
The category the product belongs in |
{
-
"description":
"string",
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string"
}
{
-
"owner":
"string",
-
"description":
"string",
-
"itemNumber":
"string",
-
"imagePaths":
[
-
"string"
],
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string",
-
"sold":
true
}
Query the catalog of products
| query |
string
A query to match |
| limit |
integer
The limit of products returned |
| sortBy |
string
The sorting order |
{
-
"owner":
"string",
-
"description":
"string",
-
"itemNumber":
"string",
-
"imagePaths":
[
-
"string"
],
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string",
-
"sold":
true
}
|
itemNumber
required
|
string
Product's reference |
{
-
"owner":
"string",
-
"description":
"string",
-
"itemNumber":
"string",
-
"imagePaths":
[
-
"string"
],
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string",
-
"sold":
true
}
Will set a products as sold
|
itemNumber
required
|
string
Product's reference |
{
-
"owner":
"string",
-
"description":
"string",
-
"itemNumber":
"string",
-
"imagePaths":
[
-
"string"
],
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string",
-
"sold":
true
}
Update one of the product's properties
|
itemNumber
required
|
string
Product's reference |
Choose at least one of the following properties to update
| description |
string
<=
700 characters
A 700 character description of the product |
| name |
string
The name of the product |
| price |
integer
The price of the product |
| condition |
string
A description of the condition of the product |
| category |
string
The category the product belongs in |
{
-
"description":
"string",
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string"
}
{
-
"owner":
"string",
-
"description":
"string",
-
"itemNumber":
"string",
-
"imagePaths":
[
-
"string"
],
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string",
-
"sold":
true
}
Get a product's inforamtion with the itemNumber
|
itemNumber
required
|
string
Product's reference |
{
-
"owner":
"string",
-
"description":
"string",
-
"itemNumber":
"string",
-
"imagePaths":
[
-
"string"
],
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string",
-
"sold":
true
}
Get information on a product's owner
|
itemNumber
required
|
string
Product's reference |
{
-
"username":
"string",
-
"imageName":
"string",
-
"arrayOfProducts":
[
-
{
-
"owner":
"string",
-
"description":
"string",
-
"itemNumber":
"string",
-
"imagePaths":
[
-
"string"
],
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string",
-
"sold":
true
}
]
}
Set a product's image(s)
|
itemNumber
required
|
string
Product's reference |
An image url
| file |
Array of strings
<binary>
|
{
-
"owner":
"string",
-
"description":
"string",
-
"itemNumber":
"string",
-
"imagePaths":
[
-
"string"
],
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string",
-
"sold":
true
}
Delete a product's image(s)
|
itemNumber
required
|
string
Product's reference |
An array of images
A images's name
[
-
"string"
]
{
-
"owner":
"string",
-
"description":
"string",
-
"itemNumber":
"string",
-
"imagePaths":
[
-
"string"
],
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string",
-
"sold":
true
}
Read an offer made for a product
|
offerRef
required
|
string
An offer for a product |
{
-
"offerAmount":
0,
-
"productRef":
"string",
-
"reference":
"string",
-
"offerViewed":
true,
-
"offerAccepted":
true,
-
"offerRejected":
true,
-
"offerDate":
"2019-08-24",
-
"message":
"string",
-
"buyerReference":
"string"
}
[
-
{
-
"offerAmount":
0,
-
"productRef":
"string",
-
"reference":
"string",
-
"offerViewed":
true,
-
"offerAccepted":
true,
-
"offerRejected":
true,
-
"offerDate":
"2019-08-24",
-
"message":
"string",
-
"buyerReference":
"string"
}
]
Create and send an offer to a seller
A offer needs only offerAmount, buyerReference, and productRef
| offerAmount |
number
The dollar amount being offered for the product |
| productRef |
string
The identifier for the product |
| buyerReference |
string
A reference to the user sending the offer |
{
-
"offerAmount":
0,
-
"productRef":
"string",
-
"buyerReference":
"string"
}
Send a message to a seller
|
senderRef
required
|
string
The sender's reference (username) |
|
recipientRef
required
|
string
The recipient reference (username) |
|
text
required
|
string
<=
700 characters
The message body |
| date |
string
<date>
The date the message was sent |
{
-
"senderRef":
"string",
-
"recipientRef":
"string",
-
"text":
"string",
-
"date":
"2019-08-24"
}
{
-
"senderRef":
"string",
-
"recipientRef":
"string",
-
"text":
"string",
-
"date":
"2019-08-24"
}
Send a reply to a message
|
messageRef
required
|
string
A message reference |
|
senderRef
required
|
string
The sender's reference (username) |
|
recipientRef
required
|
string
The recipient reference (username) |
|
text
required
|
string
<=
700 characters
The message body |
| date |
string
<date>
The date the message was sent |
{
-
"senderRef":
"string",
-
"recipientRef":
"string",
-
"text":
"string",
-
"date":
"2019-08-24"
}
{
-
"senderRef":
"string",
-
"recipientRef":
"string",
-
"text":
"string",
-
"date":
"2019-08-24"
}
Register a user account
|
password
required
|
string
<password>
|
|
username
required
|
string
|
|
email
required
|
string
|
{
-
"password":
"pa$$word",
-
"username":
"string",
-
"email":
"string"
}
{
-
"username":
"string",
-
"email":
"user@example.com",
-
"imageName":
"string",
-
"arrayOfProducts":
[
-
{
-
"owner":
"string",
-
"description":
"string",
-
"itemNumber":
"string",
-
"imagePaths":
[
-
"string"
],
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string",
-
"sold":
true
}
],
-
"token":
"string"
}
Update a user's username
| username |
string
|
{
-
"username":
"string"
}
{
-
"username":
"string",
-
"email":
"user@example.com",
-
"imageName":
"string",
-
"arrayOfProducts":
[
-
{
-
"owner":
"string",
-
"description":
"string",
-
"itemNumber":
"string",
-
"imagePaths":
[
-
"string"
],
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string",
-
"sold":
true
}
],
-
"token":
"string"
}
Log a user in using email and password
| password |
string
<password>
|
|
string
|
{
-
"password":
"pa$$word",
-
"email":
"string"
}
{
-
"username":
"string",
-
"email":
"user@example.com",
-
"imageName":
"string",
-
"arrayOfProducts":
[
-
{
-
"owner":
"string",
-
"description":
"string",
-
"itemNumber":
"string",
-
"imagePaths":
[
-
"string"
],
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string",
-
"sold":
true
}
],
-
"token":
"string"
}
Get username, image, and product's from a user
|
username
required
|
string
<username>
The user's username |
{
-
"username":
"string",
-
"imageName":
"string",
-
"arrayOfProducts":
[
-
{
-
"owner":
"string",
-
"description":
"string",
-
"itemNumber":
"string",
-
"imagePaths":
[
-
"string"
],
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string",
-
"sold":
true
}
]
}
Get information on a product's owner
|
itemNumber
required
|
string
Product's reference |
{
-
"username":
"string",
-
"imageName":
"string",
-
"arrayOfProducts":
[
-
{
-
"owner":
"string",
-
"description":
"string",
-
"itemNumber":
"string",
-
"imagePaths":
[
-
"string"
],
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string",
-
"sold":
true
}
]
}
Set a user's image(s)
An image url
| file |
Array of strings
<binary>
|
{
-
"username":
"string",
-
"email":
"user@example.com",
-
"imageName":
"string",
-
"arrayOfProducts":
[
-
{
-
"owner":
"string",
-
"description":
"string",
-
"itemNumber":
"string",
-
"imagePaths":
[
-
"string"
],
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string",
-
"sold":
true
}
],
-
"token":
"string"
}
Delete a user's image(s)
An array of images
A images's name
[
-
"string"
]
{
-
"username":
"string",
-
"email":
"user@example.com",
-
"imageName":
"string",
-
"arrayOfProducts":
[
-
{
-
"owner":
"string",
-
"description":
"string",
-
"itemNumber":
"string",
-
"imagePaths":
[
-
"string"
],
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string",
-
"sold":
true
}
],
-
"token":
"string"
}
Set a user's image(s)
An image url
| file |
Array of strings
<binary>
|
{
-
"username":
"string",
-
"email":
"user@example.com",
-
"imageName":
"string",
-
"arrayOfProducts":
[
-
{
-
"owner":
"string",
-
"description":
"string",
-
"itemNumber":
"string",
-
"imagePaths":
[
-
"string"
],
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string",
-
"sold":
true
}
],
-
"token":
"string"
}
Delete a user's image(s)
An array of images
A images's name
[
-
"string"
]
{
-
"username":
"string",
-
"email":
"user@example.com",
-
"imageName":
"string",
-
"arrayOfProducts":
[
-
{
-
"owner":
"string",
-
"description":
"string",
-
"itemNumber":
"string",
-
"imagePaths":
[
-
"string"
],
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string",
-
"sold":
true
}
],
-
"token":
"string"
}
Set a product's image(s)
|
itemNumber
required
|
string
Product's reference |
An image url
| file |
Array of strings
<binary>
|
{
-
"owner":
"string",
-
"description":
"string",
-
"itemNumber":
"string",
-
"imagePaths":
[
-
"string"
],
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string",
-
"sold":
true
}
Delete a product's image(s)
|
itemNumber
required
|
string
Product's reference |
An array of images
A images's name
[
-
"string"
]
{
-
"owner":
"string",
-
"description":
"string",
-
"itemNumber":
"string",
-
"imagePaths":
[
-
"string"
],
-
"name":
"string",
-
"price":
0,
-
"condition":
"string",
-
"category":
"string",
-
"sold":
true
}